package com.hooper.wallet.util;

import com.hooper.wallet.constant.TransactTypeEnum;

/**
 * 将交易类型映射为文字的工具
 *
 * @author Tim Hooper
 * @version 1.0
 * @time 2023/03/07/20:20
 */
public class TransactMapUtil {

    public static String mapToTxt(int type) {
        switch (type) {
            case 1:
                return TransactTypeEnum.CONSUME.getDescription();
            case 2:
                return TransactTypeEnum.TOP_UP.getDescription();
            case 3:
                return TransactTypeEnum.WITHDRAW.getDescription();
            default:
                return TransactTypeEnum.REFUND.getDescription();
        }
    }
}
